package com.ruoyi.business.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.TerminationAgreementsMapper;
import com.ruoyi.business.domain.TerminationAgreements;
import com.ruoyi.business.service.ITerminationAgreementsService;

/**
 * 解约协议Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-13
 */
@Service
public class TerminationAgreementsServiceImpl implements ITerminationAgreementsService 
{
    @Autowired
    private TerminationAgreementsMapper terminationAgreementsMapper;

    /**
     * 查询解约协议
     * 
     * @param id 解约协议主键
     * @return 解约协议
     */
    @Override
    public TerminationAgreements selectTerminationAgreementsById(Long id)
    {
        return terminationAgreementsMapper.selectTerminationAgreementsById(id);
    }

    /**
     * 查询解约协议列表
     * 
     * @param terminationAgreements 解约协议
     * @return 解约协议
     */
    @Override
    public List<TerminationAgreements> selectTerminationAgreementsList(TerminationAgreements terminationAgreements)
    {
        return terminationAgreementsMapper.selectTerminationAgreementsList(terminationAgreements);
    }

    /**
     * 新增解约协议
     * 
     * @param terminationAgreements 解约协议
     * @return 结果
     */
    @Override
    public int insertTerminationAgreements(TerminationAgreements terminationAgreements)
    {
        return terminationAgreementsMapper.insertTerminationAgreements(terminationAgreements);
    }

    /**
     * 修改解约协议
     * 
     * @param terminationAgreements 解约协议
     * @return 结果
     */
    @Override
    public int updateTerminationAgreements(TerminationAgreements terminationAgreements)
    {
        return terminationAgreementsMapper.updateTerminationAgreements(terminationAgreements);
    }

    /**
     * 批量删除解约协议
     * 
     * @param ids 需要删除的解约协议主键
     * @return 结果
     */
    @Override
    public int deleteTerminationAgreementsByIds(Long[] ids)
    {
        return terminationAgreementsMapper.deleteTerminationAgreementsByIds(ids);
    }

    /**
     * 删除解约协议信息
     * 
     * @param id 解约协议主键
     * @return 结果
     */
    @Override
    public int deleteTerminationAgreementsById(Long id)
    {
        return terminationAgreementsMapper.deleteTerminationAgreementsById(id);
    }
}
